<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>我的收藏 - 学知题库</title>
    <link href="../assets/css/app.css" rel="stylesheet">
    <link href="../assets/css/font-awesome.min.css" rel="stylesheet">
    <script src="../assets/js/chart.umd.min.js"></script>
    
    <!-- Tailwind 配置 - 已合并到公共配置文件 -->
    <!-- 
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#165DFF',
                        secondary: '#36CBCB',
                        accent: '#FF7D00',
                        neutral: '#F5F7FA',
                        'neutral-dark': '#4E5969',
                        success: '#00B42A',
                        warning: '#FF7D00',
                        danger: '#F53F3F',
                    },
                    fontFamily: {
                        inter: ['Inter', 'system-ui', 'sans-serif'],
                    },
                }
            }
        }
    </script>
    -->
    
    <!-- 工具类样式 - 已合并到 src/input.css -->
    <!-- 
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .scrollbar-hide {
                -ms-overflow-style: none;
                scrollbar-width: none;
            }
            .scrollbar-hide::-webkit-scrollbar {
                display: none;
            }
            .text-shadow {
                text-shadow: 0 2px 4px rgba(0,0,0,0.1);
            }
            .card-hover {
                transition: all 0.3s ease;
            }
            .card-hover:hover {
                transform: translateY(-5px);
                box-shadow: 0 10px 20px rgba(0,0,0,0.08);
            }
            .bg-gradient-primary {
                background: linear-gradient(135deg, #165DFF 0%, #0E42B3 100%);
            }
            .progress-ring-circle {
                transition: stroke-dashoffset 0.35s;
                transform: rotate(-90deg);
                transform-origin: 50% 50%;
            }
            .animate-float {
                animation: float 3s ease-in-out infinite;
            }
            @keyframes float {
                0% { transform: translateY(0px); }
                50% { transform: translateY(-10px); }
                100% { transform: translateY(0px); }
            }
        }
    </style>
    -->
</head>
<body class="bg-gray-50 font-inter text-gray-800 min-h-screen flex flex-col">
    <!-- 顶部导航栏 -->
    <header class="bg-white shadow-sm sticky top-0 z-50 transition-all duration-300">
        <div class="container mx-auto px-4 py-3 flex items-center justify-between">
            <div class="flex items-center space-x-2">
                <a href="#" class="flex items-center">
                    <i class="fa fa-graduation-cap text-primary text-2xl mr-2"></i>
                    <h1 class="text-xl font-bold text-gray-800">学知题库</h1>
                </a>
            </div>
            
            <div class="hidden md:flex items-center space-x-6">
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">首页</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">题库</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">学习路径</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">模拟考试</a>
                <a href="#" class="text-gray-600 hover:text-primary transition-colors">关于我们</a>
            </div>
            
            <div class="flex items-center space-x-4">
                <div class="flex items-center space-x-4">
                    <div class="relative">
                        <img src="https://picsum.photos/40/40?random=user" alt="用户头像" class="w-10 h-10 rounded-full border-2 border-primary">
                    </div>
                    <span class="hidden md:inline text-gray-700">张同学</span>
                </div>
            </div>
        </div>
    </header>

    <!-- 主内容区（收藏题目页面） -->
    <main class="flex-1 py-8 bg-gray-50">
        <div class="container mx-auto px-4">
            <!-- 页面标题与操作区 -->
            <div class="mb-8 flex flex-col md:flex-row md:items-center justify-between gap-4">
                <div>
                    <h2 class="text-2xl font-bold text-gray-800">我的收藏</h2>
                    <p class="text-gray-500 mt-1">查看和管理您收藏的题目，随时复习重点内容</p>
                </div>
                <div class="flex flex-wrap gap-3">
                    <button class="px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors flex items-center">
                        <i class="fa fa-list mr-2"></i>批量操作
                    </button>
                    <div class="relative">
                        <select class="pl-4 pr-10 py-2 bg-white border border-gray-200 rounded-lg text-gray-700 appearance-none focus:outline-none focus:ring-2 focus:ring-primary/20">
                            <option>默认排序（最新收藏）</option>
                            <option>按学科分类</option>
                            <option>按难度排序</option>
                        </select>
                        <i class="fa fa-chevron-down absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 pointer-events-none"></i>
                    </div>
                </div>
            </div>

            <!-- 收藏分类标签 -->
            <div class="mb-8 overflow-x-auto scrollbar-hide">
                <div class="flex gap-2 pb-2 min-w-max">
                    <button class="px-4 py-2 bg-primary text-white rounded-full text-sm whitespace-nowrap">全部收藏</button>
                    <button class="px-4 py-2 bg-white text-gray-600 rounded-full text-sm hover:bg-gray-100 transition-colors whitespace-nowrap">数学</button>
                    <button class="px-4 py-2 bg-white text-gray-600 rounded-full text-sm hover:bg-gray-100 transition-colors whitespace-nowrap">语文</button>
                    <button class="px-4 py-2 bg-white text-gray-600 rounded-full text-sm hover:bg-gray-100 transition-colors whitespace-nowrap">英语</button>
                    <button class="px-4 py-2 bg-white text-gray-600 rounded-full text-sm hover:bg-gray-100 transition-colors whitespace-nowrap">物理</button>
                    <button class="px-4 py-2 bg-white text-gray-600 rounded-full text-sm hover:bg-gray-100 transition-colors whitespace-nowrap">化学</button>
                    <button class="px-4 py-2 bg-white text-gray-600 rounded-full text-sm hover:bg-gray-100 transition-colors whitespace-nowrap">自定义分类1</button>
                    <button class="px-4 py-2 bg-white border border-dashed border-gray-300 text-gray-500 rounded-full text-sm hover:bg-gray-50 transition-colors whitespace-nowrap flex items-center">
                        <i class="fa fa-plus mr-1"></i>添加分类
                    </button>
                </div>
            </div>

            <!-- 收藏题目列表 -->
            <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
                <!-- 收藏题目1 -->
                <div class="bg-white rounded-xl shadow-sm overflow-hidden card-hover">
                    <div class="p-6">
                        <div class="flex justify-between items-start mb-4">
                            <div class="flex items-center gap-2">
                                <span class="px-2 py-1 bg-primary/10 text-primary text-xs rounded-full">数学</span>
                                <span class="px-2 py-1 bg-warning/10 text-warning text-xs rounded-full">中等难度</span>
                            </div>
                            <div class="flex items-center gap-2">
                                <button class="text-gray-400 hover:text-primary transition-colors" title="编辑分类">
                                    <i class="fa fa-folder-o"></i>
                                </button>
                                <button class="text-gray-400 hover:text-danger transition-colors" title="取消收藏">
                                    <i class="fa fa-star text-warning"></i>
                                </button>
                            </div>
                        </div>
                        
                        <h3 class="font-medium text-gray-800 mb-4">已知函数f(x) = x² - 2x + 3，求其在区间[0, 3]上的最大值和最小值。</h3>
                        
                        <div class="space-y-3 mb-4">
                            <div class="flex items-start gap-2">
                                <span class="text-gray-500">解题步骤：</span>
                                <p class="text-gray-600 text-sm">1. 求导数f’(x) = 2x - 2；2. 令f’(x) = 0，得驻点x=1；3. 计算端点和驻点的函数值...</p>
                            </div>
                            <div class="flex items-start gap-2">
                                <span class="text-gray-500">答案总结：</span>
                                <p class="text-gray-600 text-sm font-medium">最大值为6（x=3时），最小值为2（x=1时）</p>
                            </div>
                        </div>
                        
                        <div class="flex justify-between items-center pt-3 border-t border-gray-100">
                            <span class="text-gray-400 text-sm">收藏于 06-20 15:30</span>
                            <a href="#" class="text-primary hover:text-primary/80 transition-colors text-sm flex items-center">
                                <i class="fa fa-external-link mr-1"></i>查看完整解析
                            </a>
                        </div>
                    </div>
                </div>

                <!-- 收藏题目2 -->
                <div class="bg-white rounded-xl shadow-sm overflow-hidden card-hover">
                    <div class="p-6">
                        <div class="flex justify-between items-start mb-4">
                            <div class="flex items-center gap-2">
                                <span class="px-2 py-1 bg-secondary/10 text-secondary text-xs rounded-full">语文</span>
                                <span class="px-2 py-1 bg-danger/10 text-danger text-xs rounded-full">较难难度</span>
                            </div>
                            <div class="flex items-center gap-2">
                                <button class="text-gray-400 hover:text-primary transition-colors" title="编辑分类">
                                    <i class="fa fa-folder-o"></i>
                                </button>
                                <button class="text-gray-400 hover:text-danger transition-colors" title="取消收藏">
                                    <i class="fa fa-star text-warning"></i>
                                </button>
                            </div>
                        </div>
                        
                        <h3 class="font-medium text-gray-800 mb-4">分析《岳阳楼记》中"先天下之忧而忧，后天下之乐而乐"的思想内涵及其现实意义。</h3>
                        
                        <div class="space-y-3 mb-4">
                            <div class="flex items-start gap-2">
                                <span class="text-gray-500">解题思路：</span>
                                <p class="text-gray-600 text-sm">1. 结合作者范仲淹的生平背景分析；2. 理解"忧乐"思想与儒家"仁政"思想的联系；3. 联系现实社会解读其当代价值...</p>
                            </div>
                            <div class="flex items-start gap-2">
                                <span class="text-gray-500">答案要点：</span>
                                <p class="text-gray-600 text-sm font-medium">体现了作者以天下为己任的政治抱负，对当代公民意识培养具有重要启示意义。</p>
                            </div>
                        </div>
                        
                        <div class="flex justify-between items-center pt-3 border-t border-gray-100">
                            <span class="text-gray-400 text-sm">收藏于 06-18 09:45</span>
                            <a href="#" class="text-primary hover:text-primary/80 transition-colors text-sm flex items-center">
                                <i class="fa fa-external-link mr-1"></i>查看完整解析
                            </a>
                        </div>
                    </div>
                </div>

                <!-- 收藏题目3 -->
                <div class="bg-white rounded-xl shadow-sm overflow-hidden card-hover">
                    <div class="p-6">
                        <div class="flex justify-between items-start mb-4">
                            <div class="flex items-center gap-2">
                                <span class="px-2 py-1 bg-accent/10 text-accent text-xs rounded-full">英语</span>
                                <span class="px-2 py-1 bg-success/10 text-success text-xs rounded-full">简单难度</span>
                            </div>
                            <div class="flex items-center gap-2">
                                <button class="text-gray-400 hover:text-primary transition-colors" title="编辑分类">
                                    <i class="fa fa-folder-o"></i>
                                </button>
                                <button class="text-gray-400 hover:text-danger transition-colors" title="取消收藏">
                                    <i class="fa fa-star text-warning"></i>
                                </button>
                            </div>
                        </div>
                        
                        <h3 class="font-medium text-gray-800 mb-4">Choose the correct form of the verb: She ______ (study) English for 5 years before she went to London.</h3>
                        
                        <div class="space-y-3 mb-4">
                            <div class="flex items-start gap-2">
                                <span class="text-gray-500">语法要点：</span>
                                <p class="text-gray-600 text-sm">本题考查过去完成时（had + 过去分词）的用法，强调"过去的过去"发生的动作。</p>
                            </div>
                            <div class="flex items-start gap-2">
                                <span class="text-gray-500">答案：</span>
                                <p class="text-gray-600 text-sm font-medium">had studied</p>
                            </div>
                        </div>
                        
                        <div class="flex justify-between items-center pt-3 border-t border-gray-100">
                            <span class="text-gray-400 text-sm">收藏于 06-15 16:20</span>
                            <a href="#" class="text-primary hover:text-primary/80 transition-colors text-sm flex items-center">
                                <i class="fa fa-external-link mr-1"></i>查看完整解析
                            </a>
                        </div>
                    </div>
                </div>

                <!-- 收藏题目4 -->
                <div class="bg-white rounded-xl shadow-sm overflow-hidden card-hover">
                    <div class="p-6">
                        <div class="flex justify-between items-start mb-4">
                            <div class="flex items-center gap-2">
                                <span class="px-2 py-1 bg-warning/10 text-warning text-xs rounded-full">物理</span>
                                <span class="px-2 py-1 bg-warning/10 text-warning text-xs rounded-full">中等难度</span>
                            </div>
                            <div class="flex items-center gap-2">
                                <button class="text-gray-400 hover:text-primary transition-colors" title="编辑分类">
                                    <i class="fa fa-folder-o"></i>
                                </button>
                                <button class="text-gray-400 hover:text-danger transition-colors" title="取消收藏">
                                    <i class="fa fa-star text-warning"></i>
                                </button>
                            </div>
                        </div>
                        
                        <h3 class="font-medium text-gray-800 mb-4">一个质量为2kg的物体，在光滑水平面上受到与水平方向成30°角的拉力F=10N作用，求物体的加速度大小。</h3>
                        
                        <div class="space-y-3 mb-4">
                            <div class="flex items-start gap-2">
                                <span class="text-gray-500">解题步骤：</span>
                                <p class="text-gray-600 text-sm">1. 对拉力F进行正交分解，水平分力F_x = F·cos30°；2. 根据牛顿第二定律F_x = ma；3. 代入数据计算...</p>
                            </div>
                            <div class="flex items-start gap-2">
                                <span class="text-gray-500">答案：</span>
                                <p class="text-gray-600 text-sm font-medium">a ≈ 4.33 m/s²</p>
                            </div>
                        </div>
                        
                        <div class="flex justify-between items-center pt-3 border-t border-gray-100">
                            <span class="text-gray-400 text-sm">收藏于 06-12 14:10</span>
                            <a href="#" class="text-primary hover:text-primary/80 transition-colors text-sm flex items-center">
                                <i class="fa fa-external-link mr-1"></i>查看完整解析
                            </a>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 分页 -->
            <div class="flex justify-center">
                <div class="flex items-center gap-2">
                    <button class="w-10 h-10 flex items-center justify-center rounded-lg border border-gray-200 text-gray-400 hover:border-primary hover:text-primary transition-colors disabled:opacity-50 disabled:cursor-not-allowed" disabled>
                        <i class="fa fa-chevron-left"></i>
                    </button>
                    <button class="w-10 h-10 flex items-center justify-center rounded-lg bg-primary text-white">1</button>
                    <button class="w-10 h-10 flex items-center justify-center rounded-lg border border-gray-200 hover:border-primary hover:text-primary transition-colors">2</button>
                    <button class="w-10 h-10 flex items-center justify-center rounded-lg border border-gray-200 hover:border-primary hover:text-primary transition-colors">3</button>
                    <span class="text-gray-500">...</span>
                    <button class="w-10 h-10 flex items-center justify-center rounded-lg border border-gray-200 hover:border-primary hover:text-primary transition-colors">6</button>
                    <button class="w-10 h-10 flex items-center justify-center rounded-lg border border-gray-200 text-gray-700 hover:border-primary hover:text-primary transition-colors">
                        <i class="fa fa-chevron-right"></i>
                    </button>
                </div>
            </div>
        </div>
    </main>

    <!-- 页脚 -->
    <footer class="bg-gray-800 text-white py-12 mt-12">
        <div class="container mx-auto px-4">
            <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
                <div>
                    <div class="flex items-center mb-4">
                        <i class="fa fa-graduation-cap text-primary text-2xl mr-2"></i>
                        <h3 class="text-xl font-bold">学知题库</h3>
                    </div>
                    <p class="text-gray-400 mb-4">智能教育资源平台，助力学生高效学习</p>
                    <div class="flex space-x-4">
                        <a href="#" class="text-gray-400 hover:text-white transition-colors">
                            <i class="fa fa-weibo"></i>
                        </a>
                        <a href="#" class="text-gray-400 hover:text-white transition-colors">
                            <i class="fa fa-wechat"></i>
                        </a>
                        <a href="#" class="text-gray-400 hover:text-white transition-colors">
                            <i class="fa fa-qq"></i>
                        </a>
                        <a href="#" class="text-gray-400 hover:text-white transition-colors">
                            <i class="fa fa-github"></i>
                        </a>
                    </div>
                </div>
                
                <div>
                    <h4 class="text-lg font-medium mb-4">快速链接</h4>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">首页</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">题库</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">学习路径</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">模拟考试</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">关于我们</a></li>
                    </ul>
                </div>
                
                <div>
                    <h4 class="text-lg font-medium mb-4">帮助中心</h4>
                    <ul class="space-y-2">
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">常见问题</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">使用指南</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">意见反馈</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">联系我们</a></li>
                        <li><a href="#" class="text-gray-400 hover:text-white transition-colors">隐私政策</a></li>
                    </ul>
                </div>
                
                <div>
                    <h4 class="text-lg font-medium mb-4">联系我们</h4>
                    <ul class="space-y-2">
                        <li class="flex items-center">
                            <i class="fa fa-map-marker text-primary mr-2"></i>
                            <span class="text-gray-400">北京市海淀区中关村大街1号</span>
                        </li>
                        <li class="flex items-center">
                            <i class="fa fa-phone text-primary mr-2"></i>
                            <span class="text-gray-400">400-123-4567</span>
                        </li>
                        <li class="flex items-center">
                            <i class="fa fa-envelope text-primary mr-2"></i>
                            <span class="text-gray-400">contact@xuezhi.com</span>
                        </li>
                        <li class="flex items-center">
                            <i class="fa fa-clock-o text-primary mr-2"></i>
                            <span class="text-gray-400">周一至周日 9:00-21:00</span>
                        </li>
                    </ul>
                </div>
            </div>
            
            <div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-400">
                <p>&copy; 2025 学知题库 版权所有 | 京ICP备12345678号</p>
            </div>
        </div>
    </footer>

    <!-- JavaScript -->
    <script>
        // 导航栏滚动效果
        window.addEventListener('scroll', function() {
            const header = document.querySelector('header');
            if (window.scrollY > 50) {
                header.classList.add('py-2');
                header.classList.remove('py-3');
                header.classList.add('shadow');
            } else {
                header.classList.add('py-3');
                header.classList.remove('py-2');
                header.classList.remove('shadow');
            }
        });

        // 取消收藏功能
        document.querySelectorAll('.fa-star').forEach(star => {
            star.parentElement.addEventListener('click', function() {
                const card = this.closest('.card-hover');
                // 添加删除动画
                card.classList.add('opacity-0', 'transform', 'scale-95', 'transition-all', 'duration-300');
                
                // 模拟删除操作
                setTimeout(() => {
                    // 实际项目中这里会调用API删除数据
                    card.remove();
                }, 300);
            });
        });

        // 返回顶部按钮
        const backToTopButton = document.createElement('button');
        backToTopButton.id = 'backToTop';
        backToTopButton.className = 'fixed bottom-6 right-6 bg-primary text-white w-12 h-12 rounded-full flex items-center justify-center shadow-lg opacity-0 transition-opacity duration-300 hover:bg-primary/90';
        backToTopButton.innerHTML = '<i class="fa fa-arrow-up"></i>';
        document.body.appendChild(backToTopButton);
        
        window.addEventListener('scroll', function() {
            if (window.scrollY > 300) {
                backToTopButton.classList.add('opacity-100');
                backToTopButton.classList.remove('opacity-0');
            } else {
                backToTopButton.classList.add('opacity-0');
                backToTopButton.classList.remove('opacity-100');
            }
        });
        
        backToTopButton.addEventListener('click', function() {
            window.scrollTo({
                top: 0,
                behavior: 'smooth'
            });
        });
    </script>
</body>
</html>